export default {
  install(Vue) {
    Vue.prototype.$plat = {

      isWechatBrowser: function() {
        let userAgent = window.navigator.userAgent.toLowerCase()
        return (userAgent.match(/MicroMessenger/i) == 'micromessenger')
      },

      isAndroidApp: function() {
        let userAgent = window.navigator.userAgent.toLowerCase()
        return (userAgent.match(/AndroidApp/i) == 'androidapp')
      },

    }
  }
}
